import './assets/main.css'; // 引入默认css样式

import { createApp } from 'vue';
import { createPinia } from 'pinia';
import ElementPlus from 'element-plus'; // 引入element-plus
import 'element-plus/dist/index.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'; // 引入element-plus图标

import App from './App.vue';
import router from './router';

const app = createApp(App);

app.use(createPinia());
app.use(ElementPlus); // 挂载element-plus到app上
app.use(router);

// 全局注册图标组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.mount('#app');
